<Query Kind="VBStatements" />

' In the latest version, declaring types are optional
Dim MyAge = 30  ' The compiler will declare this as a Integer for us
Dim WeeklySalary = 632.45  ' If it sees a decimal, it will declare it as a Double
Dim Greeting = "Hello World"  ' This can only be a String
Dim LetterOfTheDay = new char()  ' We tell
LetterOfTheDay = "q"

MyAge.GetType().Dump("MyAge")
WeeklySalary.GetType().Dump("WeeklySalary")
LetterOfTheDay.GetType().Dump("LetterOfTheDay")


' Type inferencing doesn't let you do this...
Dim message = "Hi"  ' <-- String
Dim x = 5 ' <-- Integer
Dim y = 22432.23

message = 3455 ' <--  This is ok, because a number can always convert to a string

' This is actually ok because we can convert in these scenarios
x = "54"  
x.Dump("From String")

x = 54.123123 ' The decimals will get cut off
x.Dump("From Double")

x = "54.3"
x.Dump("From String looking like a Double")

' This is not ok, because how can "Hello" turn into an integer
x = "Hi"
